-
Notifications
You must be signed in to change notification settings - Fork 23
update program and cli to sdk 3.0 #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f17e7b9 to
55acb74
Compare
| [features] | ||
| no-entrypoint = [] | ||
| custom-heap = [] | ||
| custom-panic = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
someone on stack exchange claims you dont need this to silence warnings on the latest solana-program-entrypoint but we are on latest and i still get warnings so i dont think thats true
|
since i opened this different sdk packages depend on different versions of solana-hash which depend on different versions of serde now... its not a priority so ill wait a week or two assuming this is transitory |
| match u32::from_le_bytes(state_variant) { | ||
| 1 | 2 => Ok(()), | ||
| 1 | 2 | 3 => Ok(()), | ||
| 0 => Err(SinglePoolError::LegacyVoteAccount.into()), | ||
| _ => Err(SinglePoolError::UnparseableVoteAccount.into()), | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this gives us VoteStateV4 support, it was necessary to do in this pr to get tests to pass. in the future it would be cleaner to switch to the VoteState parser though, which did not exist when this program was originally written. i didnt want to make any nontrivial functional changes in this one
|
@grod220 not sure if your stake-involvement is going to extend to the pools as well, if not i can give this to jon instead. but despite the large diff this has 1 line that actually changes functionality, the rest is 90% Cargo.lock 10% boilerplate |
grod220
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Think you should feel free to fix the remaining uninlined_format_args or save for later.
| @@ -1,4 +1,5 @@ | |||
| #![allow(clippy::arithmetic_side_effects)] | |||
| #![allow(clippy::uninlined_format_args)] | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed you made a number of fixes that would pass this rule. Maybe worth just fixing the remaining? Up to you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a future PR, may be nice to use workspace deps for these
cargo upgrade)spl-token,spl-associated-token-account, andspl-associated-token-account-clientin the program with interface cratesthe diff is large but this has mostly trivial code changes, namely: swapping to token/ata interfaces, changing
VoteStatetoVoteStateV4, changing some import paths, and inlining some format args because clippy wants this now. the only notable change is the addition ofVoteStateV4support to the programi confess to carefully choosing a nightly version that avoids the
this call to clone can be replaced with std::slice::from_refclippy warning, as i didnt want to further overladen the diffthis is (no longer) blocked by:
approve svsp 3.0.0 deployment on mainnetland interface: include onramp in deposit/withdraw #396svsp patch and cli major releasescloses #397
closes #406